package dymnd.image;


public class LayerFactory {
	private long idCounter = 0;
	private final static LayerFactory INSTANCE = new LayerFactory();
	private LayerFactory()	{
		
	}
	
	public Layer createLayer(int width, int height, String owner)	{
		Layer l = new Layer(width, height, owner);
		
		//l.getGraphics().drawString("Weeeeee", 10, 10);
		l.id = idCounter;
		idCounter++;
		if(l == null)
			System.out.println("Null layer ><");
		return l;
	}
	
	/*public Layer createLayer(int width, int height)	{
		Layer l = new Layer(width, height, null);
		l.id = idCounter;
		idCounter++;
		return l;
	}*/
	
	/*private static class FactoryHolder()	{
		
	}*/

	public static LayerFactory getInstance()	{
		return INSTANCE;
	}
}
